package com.smartian.v2;


import java.util.LinkedHashMap;
import java.util.Map;

public class Constants {
    //重复type
    public static final int REPEAT_NONE = 0;
    public static final int REPEAT_EVERY_DAY = 1;
    public static final int REPEAT_WEEKLY = 2;
    public static final int REPEAT_EVERY_TWO_WEEKS = 3;
    public static final int REPEAT_PER_MONTH = 4;
    public static final int REPEAT_EVERY_THREE_MONTHS = 5;
    public static final int REPEAT_EVERY_SIX_MONTHS = 6;
    public static final int REPEAT_PER_YEAR = 7;
    public static final int REPEAT_EVERY_WORKING_DAY = 8;

    //重复提醒状态
    public static final int EVENT_UNDO = 0;
    public static final int EVENT_COMPLETE = 1;
    public static final int EVENT_DELETE = 2;

    public static final int END_TIME_NONE = 0;
    public static final int PICK_TIME_NONE = 0;
    public static final int HABIT_NONE = 0;
    public static final int TIME_NONE = 0;
    public static final int MODIFY_NONE = 0;
    public static final int SELECT_NONE = -1;

    //form
    public static final int FROM_NONE = 1000;
    public static final int FROM_CHOICE_HABIT = 1001;
    public static final int FROM_TASK_LIST = 1002;
    public static final int FROM_CREATE_REMINDER = 1003;
    public static final int FROM_ASR_REMINDER = 1004;
    public static final int FROM_REMINDER_DETAIL = 1005;
    public static final int FROM_REMINDER_CALENDAR_ADD = 1006;
    public static final int FROM_CREATE_REMINDER_VOICE = 1007;
    public static final int FROM_SETTING = 1008;
    public static final int FROM_SHARE_DIALOG = 1009;
    public static final int FROM_MAIN = 1010;
    //result
    public static final int RESULT_CODE_FINISH = 1;
    public static final int RESULT_CODE_TO_REMINDER_DETAIL = 2;

    //requestCode
    public static final int REQUEST_CODE_CREATE = 1;

    //resultCode
    public static final int RESULT_CODE_TO_CREATE = 1;
    public static final int RESULT_CODE_TO_REMINDER_HOME = 2;

    //key
    public static final String KEY_REMINDER = "reminder";
    public static final String KEY_TO_REMINDER_FROM = "reminder_from";

    public static final int WEEK_ADAPTER_COUNT = 440;
    public static final int MONTH_ADAPTER_COUNT = 440;

    //时间周期
    public static final int CYCLE_NONE = 0;
    public static final int CYCLE_WEEKLY = 1;
    public static final int CYCLE_EVERY_TWO_WEEKS = 2;
    public static final int CYCLE_21_DAYS = 3;
    public static final int CYCLE_PER_MONTH = 4;
    public static final int CYCLE_HALF_YEAR = 5;
    public static final int CYCLE_PER_YEAR = 6;
    public static final int CYCLE_CUSTOMIZE = 7;

    //key-保存是否存在reminder
    public static final String KEY_EXIST_REMINDER = "exist_reminder";
    //因为不确定之前的版本是否存在reminder因此当不确定时需要判断
    public static final int REMINDER_STATUS_UNCERTAIN = 0;
    //不存在reminder
    public static final int REMINDER_STATUS_NONE = 1;
    //存在reminder
    public static final int REMINDER_STATUS_EXIST = 2;

    //设置页 push开关状态
    public static final String KEY_SETTING_PUSH = "key_setting_push";
    public static final int PUSH_STATUS_NONE = 0;
    public static final int PUSH_STATUS_ON = 1;
    public static final int PUSH_STATUS_OFF = 2;
    public static final int PUSH_STATUS_ON_FAIL = 3;
    public static final int PUSH_STATUS_OFF_FAIL = 4;

    //习惯显示位置
    public static final int HABIT_SHOW_PAGE_NONE = 0;
    public static final int HABIT_SHOW_PAGE_FIRST_SCREEN = 1;
    public static final int HABIT_SHOW_PAGE_MORE = 2;

    //数据库操作状态码
    public static final int DATABASE_OPERATE_FAIL = -1;
    public static final int DATABASE_OPERATE_SUCCESS = 1;


    //CloudConfig
    public static final String CLOUD_SECTION_GUIDE = "cm_cn_remind_guide";
    public static final String CLOUD_KEY_GUIDE = "open";
    public static final boolean CLOUD_DEFAULT_GUIDE = true;

    public static Map<Integer, String> getRepeatType() {
        Map<Integer, String> repeatType = new LinkedHashMap<>();
        repeatType.put(REPEAT_NONE, "无");
        repeatType.put(REPEAT_EVERY_DAY, "每天");
        repeatType.put(REPEAT_EVERY_WORKING_DAY, "每工作日");
        repeatType.put(REPEAT_WEEKLY, "每周");
        repeatType.put(REPEAT_EVERY_TWO_WEEKS, "每两周");
        repeatType.put(REPEAT_PER_MONTH, "每月");
        repeatType.put(REPEAT_EVERY_THREE_MONTHS, "每3个月");
        repeatType.put(REPEAT_EVERY_SIX_MONTHS, "每6个月");
        repeatType.put(REPEAT_PER_YEAR, "每年");
        return repeatType;
    }



}
